/* 
* linux-3.0.8/drivers/video/backlight/gt2440_backlight.h
*/

#ifndef GT2440_BACKLIGHT_H
#define GT2440_BACKLIGHT_H



/* platform data structure */
struct gt2440_backlight_platdata {
	int pwm_id;
	unsigned int max_brightness;
	unsigned int dft_brightness;
	unsigned int lth_brightness;
	unsigned int pwm_period_ns;
	int (*init)(struct device *dev);
	int (*notify)(struct device *dev, int brightness);
	void (*exit)(struct device *dev);
	int (*check_fb)(struct device *dev, struct fb_info *info);
};


/* driver data structure */
struct gt2440_backlight_info {
	struct pwm_device	*pwm_dev;
	struct backlight_device *backlight_dev;
	struct device		*dev;
	
	unsigned int		period;
	unsigned int		lth_brightness;
	int			(*notify)(struct device *, int brightness);
	int			(*check_fb)(struct device *, struct fb_info *);
};










/***** plat device name *****/
#define PLAT_DEVICE_NAME	"gt2440-backlight"


/* function declare */
static int gt2440_backlight_update_status(struct backlight_device *backlight_dev);
static int gt2440_backlight_get_brightness(struct backlight_device *backlight_dev);
static int gt2440_backlight_check_fb(struct backlight_device *backlight_dev,
				  struct fb_info *fb_inf);



/***** debug  *****/
#define GT2440_BACKLIGHT_DEBUG
#ifdef GT2440_BACKLIGHT_DEBUG
#define dprintk printk
#else
#define dprintk(...)
#endif


#endif
	
